package com.example.carbonbackend.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 交易记录表
 * @TableName Trade
 */
@TableName(value ="trade")
@Data
public class Trade implements Serializable {
    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 区块链交易id
     */
    @TableField(value = "blockchain_id")
    private String blockchainId;

    /**
     * 买方id
     */
    @TableField(value = "buyer_id")
    private Long buyerId;

    /**
     * 卖方id
     */
    @TableField(value = "seller_id")
    private Long sellerId;

    /**
     * 数量
     */
    @TableField(value = "amount")
    private Long amount;

    /**
     * 价格
     */
    @TableField(value = "price")
    private Long price;

    /**
     * 交易日期
     */
    @TableField(value = "trade_time")
    private Date tradeTime;

    /**
     * 是否删除
     */
    @TableField(value = "is_delete")
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}